package net.adetech.cjg.outerservice.service;


import com.alibaba.fastjson.JSONObject;
import net.adetech.cjg.outerservice.utils.BankUtil;
import net.adetech.cjg.outerservice.utils.OuterServiceUtil;
import net.adetech.framework.utils.SerializeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("bank.buildOrder")
public class BuildBankOrderService implements BaseService {
    @Autowired
    BankUtil bankUtil;

    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {
        String orderNumber = (String)params.get("orderNum");
        String amount = (String)params.get("amount");

        JSONObject jsonObject = bankUtil.getQrcode(orderNumber,orderNumber,"工本费",amount);
        return OuterServiceUtil.buildResult("result",jsonObject.toJSONString());
    }
}
